<template>
  <el-dropdown-item
    :disabled="!proxy.$permission(data.permission) || (data.disabled && typeof data.disabled === 'function' ? data.disabled(row, index) : data.disabled)"
    :divided="divided" @click.stop="
      () => {
        if (data.click && typeof data.click === 'function') {
          data.click(row, index);
        }
      }
    " v-if="data && !!!(typeof data.hidden === 'function' ? data.hidden(row) : data.hidden)">
    <el-tooltip effect="dark" content="无权限" placement="left" :disabled="proxy.$permission(data.permission)">
      <p>{{ typeof data.title === 'function' ? data.title(row) : data.title }}</p>
    </el-tooltip>
  </el-dropdown-item>
</template>
<script setup lang="ts">
const { proxy } = getCurrentInstance() as any;
//获取父级数据
const props = withDefaults(
  defineProps<{
    data: any;
    row: any;
    index: number;
    divided?: boolean;
  }>(),
  {

  },
);


</script>
<style scoped></style>
